<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page language="java"
	import="com.icss.cooperative.model.basic.SynOfficial;"%>

<!-- 引入标签库-->
<%@ include file="/pages/inc/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="/pages/inc/header.jsp"%>
<title>督办稿纸要素</title>
</head>
<body>
	<div style="width: 100%;; margin: auto; padding: 0em 0;">
		<form id="docSuperviseForm">
			<input type="hidden" id="formId" name="formId" value="<c:out value='${docSupervise.formId}'/>"> 
			<input id="formName" name="formName" type="hidden" value="<c:out value='${docSupervise.formName}' />" /> 
			<input id="processId" name="processId" type="hidden" value="<c:out value='${docSupervise.processId}'/>" /> 
			<table class="inputTable" style="margin-bottom: 0;">
				<caption style="text-align: center;">
					<c:out value='督办稿纸要素' />
				</caption>

				<tr>
					<td class="staticTdNW"><font color="red">*</font>督办标题</td>
					<td class="dynamicTdNW" colspan="5">
					<input id="docName" name="docName" class="easyui-textbox" type="text" style="width: 80%;" value="<c:out value='${docSupervise.docName}' />" /> 
					<input type="hidden" id="docId" name="docId" value="<c:out value='${docSupervise.docId}'/>">
					</td>
					<%-- <td class="staticTdNW">下发时间</td>
					<td class="dynamicTdNW">
					<input class="easyui-textbox" editable="false" value="<fmt:formatDate value="${docSupervise.endTime}" pattern="yyyy-MM-dd" />">
					</td> --%>
				</tr>
				<tr>
					<td class="staticTdNW" style="width: 10%">督办编号</td>
					<td class="dynamicTdNW" style="width: 30%">
					<%@ include file="/pages/jsp/docIssue/documentNumber.jsp" %>
					</td>

					<td class="staticTdNW" style="width: 10%">督办来源</td>
					<td class="dynamicTdNW" style="width: 20%">
					<select id="superviseSource" name="superviseSource" class="easyui-combobox" editable="false" style="width: 153px;">
							<option value="">请选择</option>
							<option value="上级转办" <c:if test="${docSupervise.superviseSource eq '上级转办'}">selected</c:if>>上级转办</option>
							<option value="会议议办" <c:if test="${docSupervise.superviseSource eq '会议议办'}">selected</c:if>>会议议办</option>
							<option value="领导交办" <c:if test="${docSupervise.superviseSource eq '领导交办'}">selected</c:if>>领导交办</option>
							<option value="领导批办" <c:if test="${docSupervise.superviseSource eq '领导批办'}">selected</c:if>>领导批办</option>
					</select>
					</td>
					<td class="staticTdNW" style="width: 10%">督办部门</td>
					<td class="dynamicTdNW" style="width: 20%">
					<input id="draftOrg" name="draftOrg" class="easyui-textbox" editable="false" type="text" value="<c:out value='${docSupervise.draftOrg}'/>" /> 
					<input id="draftOrgCode" name="draftOrgCode" class="hidden" type="text" value="<c:out value='${docSupervise.draftOrgCode}'/>" />
					</td>

				</tr>
				<tr>
					<td class="staticTdNW" >拟 稿 人</td>
					<td class="dynamicTdNW">
					<input id="drafter" editable="false" name="drafter" class="easyui-textbox" type="text" value="<c:out value='${docSupervise.drafter}'/>" /> 
					<input id="drafterCode" name="drafterCode" type="hidden" value="<c:out value='${docSupervise.drafterCode}'/>" /> 
					<input id="topOrgCode" name="topOrgCode" type="hidden" value="<c:out value='${docSupervise.topOrgCode}'/>" />
					</td>
					<td class="staticTdNW">联系电话</td>
					<td class="dynamicTdNW">
					<input id="drafterTel" name="drafterTel" class="easyui-textbox" type="text" value="<c:out value='${docSupervise.drafterTel}'/>" />
					</td>
					<td class="staticTdNW">拟稿时间</td>
					<td class="dynamicTdNW">
					<input  class="easyui-textbox" editable="false"  value="<fmt:formatDate value="${docSupervise.createTime}" pattern="yyyy-MM-dd" />">
					</td>
				</tr>
			</table>
		</form>
		<form id="editTableForm">
		<table id="listTable" class="inputTable">
			<tr>
				<td colspan="6" class="staticTdNW" style="text-align: left;">
					<div id="addButtonDiv" style="float: left;">
						<a onclick="addtr()" class="easyui-linkbutton" plain="true"
							icon="icon-add">增加</a>
					</div>&nbsp;
				</td>
			</tr>
			<tr>
				<td class="staticTdNW" width="10%" style="text-align: center;">序号</td>
				<td class="staticTdNW" width="35%" style="text-align: center;">事项名称</td>
				<td class="staticTdNW" width="25%" style="text-align: center;">承办部门</td>
				<td class="staticTdNW" width="20%" style="text-align: center;">限办时间</td>
				<td class="staticTdNW" width="10%" style="text-align: center;">操作</td>
			</tr>
			<c:forEach items="${assoList }" var="item" varStatus="status">
				<tr id="cloneTr" class="cloneTr">
				<td class="dynamicTdNW" style="text-align: center;">
				<span name="index"><c:out value="${status.index+1 }"/></span>
				<input name="id" type="hidden" value='<c:out value="${item.id }"/>'>
				</td>
				<td class="dynamicTdNW">
				<input name="itemName" type="text" style="width: 290px;"  value='<c:out value="${item.itemName }"/>' />
				</td>
				<td class="dynamicTdNW">
				<select name="underTakenCode" style="width: 210px;">
						<c:forEach items="${orgList}" var="orgItem">
							<option value="<c:out value='${orgItem.orgCode}' />"><c:out value='${orgItem.orgName}' /></option>
						</c:forEach>
				</select>
				<input name="underTakeDept" type="hidden" value='<c:out value="${item.underTakeDept }"/>'/>
				<input name="orgCodes" type="hidden"  value='<c:out value="${item.underTakenCode }"/>'>
				<input name="ctId" type="hidden"  value='<c:out value="${item.id }"/>'/>
				</td>
				<td class="dynamicTdNW">
				<input name='limitTime' style="width: 160px;" value='<fmt:formatDate value="${item.limitTime}" pattern="yyyy-MM-dd" />'>
				</td>
				<td class="dynamicTdNW">
				<a name="clearbutton" icon="icon-clear" onclick="removetr(this)" plain="true">删除</a>
				</td>
			</tr>
			</c:forEach>
		</table>
		</form>
		
		<table style="display: none;">
			<tr id="cloneTr" class="cloneTr">
				<td class="dynamicTdNW" style="text-align: center;">
				<span name="index"></span>
				<input name="id" type="hidden">
				</td>
				<td class="dynamicTdNW">
				<input name="itemName" type="text" style="width: 290px;" />
				</td>
				<td class="dynamicTdNW">
				<select name="underTakenCode" style="width: 210px;">
						<c:forEach items="${orgList}" var="item">
							<option value="<c:out value='${item.orgCode}' />"><c:out value='${item.orgName}' /></option>
						</c:forEach>
				</select> 
				<input name="underTakeDept" type="hidden"/>
				<input name="ctId" type="hidden"/>
				</td>
				<td class="dynamicTdNW">
				<input name='limitTime' style="width: 160px;">
				</td>
				<td class="dynamicTdNW">
				<a name="clearbutton" icon="icon-remove" onclick="removetr(this)" plain="true">删除</a>
				</td>
			</tr>
		</table>

<script type="text/javascript">
	
	<%@ include file="/pages/jsp/commom/validator.js" %>
		
	<%@ include file="/pages/jsp/docSupervise/superviseNew.js" %>
	
</script>
	</div>
</body>
</html>